<include file="public@header"/>
<style type="text/css">
    .cardBox {
        width: 200px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        text-align: center;
        float: left;
        margin-right: 10px;
        padding: 5px;
        padding-top: 15px;
    }

    .headerBox {
        color: #fff;
        padding: 10px;
        font-size: 15px;
        height: 90px;
    }

    .bodyBox {
        padding: 10px;
    }

    .bodyBox p {
        margin-left: 5px;
    }
</style>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>工程打款</a></li>
        <li><a href="{:url('project/add',array('id'=>$id))}">添加打款记录</a></li>
    </ul>

    <div class="cardBox" style="margin-bottom: 60px">
        <div class="headerBox" style="background-color: #006fc4;">
            <p>
                工程收款总额 : <span style="color: #ffffff">{$all}</span>￥
            </p>
        </div>
    </div>

    <div class="cardBox" style="margin-bottom: 60px">
        <div class="headerBox" style="background-color: #006fc4;">
            <p>
                工程余款 : <span style="color: #ffffff">{$hss}</span>￥
            </p>
        </div>
    </div>



    <form method="post" class="js-ajax-form margin-top-20">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>日期</th>
                <th>支付方式</th>
                <th>打款单位</th>
                <th>收款单位</th>
                <th>事件</th>
                <th>单位</th>
                <th>金额</th>
                <th>备注</th>

                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="res" item="v">
                <tr>
                    <td>{$v.date}</td>
                    <td>
                        <?php
                    if($v['pay'] == 1){
                            ?>
                        微信
                        <?php
                        }elseif($v['pay'] == 2){
                        ?>
                        支付宝
                        <?php
                            }elseif($v['pay'] == 3){
                        ?>
                        银行卡
                        <?php } ?>

                    </td>
                    <td>{$v.outsComp}</td>
                    <td>{$v.insComp}</td>
                    <td>{$v.desc}</td>
                    <td>{$v.unit}</td>
                    <td>{$v.price}</td>
                    <td>{$v.title}</td>

                    <td>
                        <a class="btn btn-xs btn-primary js-ajax-submit"
                           href="{:url('project/see',array('id'=>$v['id']))}">查看详情</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" class=""
                           href="{:url('project/del',array('id'=>$v['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>